package com.maixin.code.dao;

import java.util.List;

import org.hibernate.Query;

import com.maixin.code.entity.DataDictionary;

public class DataDictionaryDAO extends BaseDAO<DataDictionary>{
	
	public void findByPage(){
		super.getSession().createQuery("");
	}
	
	@SuppressWarnings("unchecked")
	public List<DataDictionary> findPerantDict(){
		try {
			String hql = " from DataDictionary t where t.parentId is null ";
			Query query = super.getSession().createQuery(hql);
			return query.list();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return null;
		
	}
}
